export default ({ service, request, serviceForMock, requestForMock, mock, faker, tools }) => ({
  /**
   * @description 登录
   * @param {Object} data 登录携带的信息
   */
  SYS_USER_LOGIN (data = {}) {
    return request({
      url: '/auth/oauth/token?client_id=lptnyy&client_secret=wangyang119&grant_type=password&username=' + data.username + '&password=' + data.password,
      method: 'get'
    })
  },
  GET_SYS_USER_LIST (data = {}) {
    return request({
      url: '/admin/v1/user/getPageList',
      method: 'get',
      params: data
    })
  },
  GET_USER_INFO () {
    return request({
      url: '/auth/v1/userInfo',
      method: 'get'
    })
  },
  SAVE_USER (data = {}) {
    return request({
      url: '/admin/v1/user/save',
      method: 'post',
      data: data
    })
  },
  UPDATE_USER (data = {}) {
    return request({
      url: '/admin/v1/user/update',
      method: 'put',
      data: data
    })
  },
  DELETE_USER (data = {}) {
    return request({
      url: '/admin/v1/user/delete',
      method: 'delete',
      data: data
    })
  },
  DELETE_BATCH_USER (data = {}) {
    return request({
      url: '/admin/v1/user/deleteBatch',
      method: 'delete',
      data: data
    })
  }
})
